<?php

class Welcome extends Controller {

	function Welcome() {
		parent::Controller();	
	}
	
	function index() {
		if (!$this->session->userdata('username')) {
			$data['isLogin'] = FALSE;
        	redirect("/login", "location");
		} else {
			$data['isLogin'] = TRUE;
			$data['username'] = $this->session->userdata('username');
			$data['role'] = $this->session->userdata('role');
			$data['judul'] = TEKS_HEADER;
			
            
			
	        $this->load->view('welcome_message',$data);
		}
    }

}

/* End of file welcome.php */
/* Location: ./system/application/controllers/welcome.php */